﻿/**  版本信息模板在安装目录下，可自行修改。
* FA_MASTERDATA.cs
*
* 功 能： N/A
* 类 名： FA_MASTERDATA
*
* Ver    变更日期             负责人  变更内容
* ───────────────────────────────────
* V0.01  2013/10/14 11:17:28   N/A    初版
*
* Copyright (c) 2012 TKFA Corporation. All rights reserved.
*┌──────────────────────────────────┐
*│　此技术信息为本公司机密信息，未经本公司书面同意禁止向第三方披露．　│
*│　版权所有：TKFA　　　　　　　　　　　　　　│
*└──────────────────────────────────┘
*/
using System;
using System.Data;
using System.Text;
using System.Data.OracleClient;
using TKFA.IDAL;
using Maticsoft.DBUtility;//Please add references
namespace TKFA.OracleDAL
{
	/// <summary>
	/// 数据访问类:FA_MASTERDATA
	/// </summary>
	public partial class FA_MASTERDATA:IFA_MASTERDATA
	{
		public FA_MASTERDATA()
		{}
		#region  BasicMethod

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(byte[] MD_ID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from FA_MASTERDATA");
			strSql.Append(" where MD_ID=:MD_ID ");
			OracleParameter[] parameters = {
					new OracleParameter(":MD_ID", OracleType.Raw,16)			};
			parameters[0].Value = MD_ID;

			return DbHelperOra.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public bool Add(TKFA.Model.FA_MASTERDATA model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into FA_MASTERDATA(");
			strSql.Append("MD_ID,SCORPCODE,SASSETSCODE,SMASTERCARDCODE,IDENTIFIERCODE,SCLASSCODE,SALTERATIONCODE,BISNEW,SCURSTATUS,SDESCRIPTION,DIMENSIONALCODE,ONEDIMENSIONALCODE,SASSETSNAME,NINITCURRENCY,NNETVALUE,SDEPARTMENTNAME,SBUSE_DATE,SSPECIFICATION,SKEEPER,SDEVICECLASS_CODE,SFOREIGN_INITCUR,SPROJECTCODE,SWORKLOAD_TOTAL,NDEPRECIATION_RATE,NRECOVERYRATE,NDEPRECIATION_VALUE,SDEVICECLASS_NAME,SCURRENCY,SFACTORYNUMBER,NREMAINDERMONTH,NLIFELIMITATION,NRESERVEVALUE_TOTAL2,STOTALWORK,SMONTHWORK,SCONSTRUCTIONAREA,SSUPPLIERCOMPANY,SELECTRICALQUANTITY,SPROJECTNAME,NDEPRECIATION_MONTH,SWORKUNIT,NRECOVERYVALUE,SDEPRECIATIONUNIT,SSTATUSCODE,SMOTORPOWER,SFUNDSSOURCE,NRESERVEVALUE_TOTAL,SREDUCTION,SIMPORT,SPROJECT,NDEPRECIATION_TOTAL,SENTRYDATE,SCANCELLATIONEDITOR,SINCREASE,SCANCELLATIONCAUSE,SEXCHANGERATE,SBUYCOMPANY,SFACTORYNAME,SDEPR_ACCCODE,SCANCELLATIONDATE,SDEPRECIATIONMETHOD,SSTORAGESITES,SENTRYEDITOR,SDEPARTMENTCODE,SUNITNUMBER,SSUPPLYUNIT,COLUMN_11,COLUMN_12,COLUMN_13,COLUMN_14,COLUMN_15,COLUMN_16,COLUMN_17,COLUMN_18,COLUMN_19,COLUMN_20,COLUMN_21,COLUMN_22,COLUMN_23,COLUMN_24,COLUMN_25,COLUMN_26,COLUMN_27,COLUMN_28,COLUMN_29,COLUMN_30,TS,SLAST_UODATE_BY)");
			strSql.Append(" values (");
			strSql.Append(":MD_ID,:SCORPCODE,:SASSETSCODE,:SMASTERCARDCODE,:IDENTIFIERCODE,:SCLASSCODE,:SALTERATIONCODE,:BISNEW,:SCURSTATUS,:SDESCRIPTION,:DIMENSIONALCODE,:ONEDIMENSIONALCODE,:SASSETSNAME,:NINITCURRENCY,:NNETVALUE,:SDEPARTMENTNAME,:SBUSE_DATE,:SSPECIFICATION,:SKEEPER,:SDEVICECLASS_CODE,:SFOREIGN_INITCUR,:SPROJECTCODE,:SWORKLOAD_TOTAL,:NDEPRECIATION_RATE,:NRECOVERYRATE,:NDEPRECIATION_VALUE,:SDEVICECLASS_NAME,:SCURRENCY,:SFACTORYNUMBER,:NREMAINDERMONTH,:NLIFELIMITATION,:NRESERVEVALUE_TOTAL2,:STOTALWORK,:SMONTHWORK,:SCONSTRUCTIONAREA,:SSUPPLIERCOMPANY,:SELECTRICALQUANTITY,:SPROJECTNAME,:NDEPRECIATION_MONTH,:SWORKUNIT,:NRECOVERYVALUE,:SDEPRECIATIONUNIT,:SSTATUSCODE,:SMOTORPOWER,:SFUNDSSOURCE,:NRESERVEVALUE_TOTAL,:SREDUCTION,:SIMPORT,:SPROJECT,:NDEPRECIATION_TOTAL,:SENTRYDATE,:SCANCELLATIONEDITOR,:SINCREASE,:SCANCELLATIONCAUSE,:SEXCHANGERATE,:SBUYCOMPANY,:SFACTORYNAME,:SDEPR_ACCCODE,:SCANCELLATIONDATE,:SDEPRECIATIONMETHOD,:SSTORAGESITES,:SENTRYEDITOR,:SDEPARTMENTCODE,:SUNITNUMBER,:SSUPPLYUNIT,:COLUMN_11,:COLUMN_12,:COLUMN_13,:COLUMN_14,:COLUMN_15,:COLUMN_16,:COLUMN_17,:COLUMN_18,:COLUMN_19,:COLUMN_20,:COLUMN_21,:COLUMN_22,:COLUMN_23,:COLUMN_24,:COLUMN_25,:COLUMN_26,:COLUMN_27,:COLUMN_28,:COLUMN_29,:COLUMN_30,:TS,:SLAST_UODATE_BY)");
			OracleParameter[] parameters = {
					new OracleParameter(":MD_ID", OracleType.Raw,16),
					new OracleParameter(":SCORPCODE", OracleType.VarChar,20),
					new OracleParameter(":SASSETSCODE", OracleType.VarChar,20),
					new OracleParameter(":SMASTERCARDCODE", OracleType.VarChar,20),
					new OracleParameter(":IDENTIFIERCODE", OracleType.VarChar,20),
					new OracleParameter(":SCLASSCODE", OracleType.VarChar,20),
					new OracleParameter(":SALTERATIONCODE", OracleType.VarChar,20),
					new OracleParameter(":BISNEW", OracleType.Char,1),
					new OracleParameter(":SCURSTATUS", OracleType.VarChar,20),
					new OracleParameter(":SDESCRIPTION", OracleType.VarChar,20),
					new OracleParameter(":DIMENSIONALCODE", OracleType.VarChar,20),
					new OracleParameter(":ONEDIMENSIONALCODE", OracleType.VarChar,20),
					new OracleParameter(":SASSETSNAME", OracleType.VarChar,50),
					new OracleParameter(":NINITCURRENCY", OracleType.VarChar,20),
					new OracleParameter(":NNETVALUE", OracleType.VarChar,20),
					new OracleParameter(":SDEPARTMENTNAME", OracleType.VarChar,20),
					new OracleParameter(":SBUSE_DATE", OracleType.VarChar,20),
					new OracleParameter(":SSPECIFICATION", OracleType.VarChar,80),
					new OracleParameter(":SKEEPER", OracleType.VarChar,20),
					new OracleParameter(":SDEVICECLASS_CODE", OracleType.VarChar,20),
					new OracleParameter(":SFOREIGN_INITCUR", OracleType.VarChar,20),
					new OracleParameter(":SPROJECTCODE", OracleType.VarChar,20),
					new OracleParameter(":SWORKLOAD_TOTAL", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_RATE", OracleType.VarChar,20),
					new OracleParameter(":NRECOVERYRATE", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_VALUE", OracleType.VarChar,20),
					new OracleParameter(":SDEVICECLASS_NAME", OracleType.VarChar,20),
					new OracleParameter(":SCURRENCY", OracleType.VarChar,20),
					new OracleParameter(":SFACTORYNUMBER", OracleType.VarChar,20),
					new OracleParameter(":NREMAINDERMONTH", OracleType.VarChar,20),
					new OracleParameter(":NLIFELIMITATION", OracleType.VarChar,20),
					new OracleParameter(":NRESERVEVALUE_TOTAL2", OracleType.VarChar,20),
					new OracleParameter(":STOTALWORK", OracleType.VarChar,20),
					new OracleParameter(":SMONTHWORK", OracleType.VarChar,20),
					new OracleParameter(":SCONSTRUCTIONAREA", OracleType.VarChar,20),
					new OracleParameter(":SSUPPLIERCOMPANY", OracleType.VarChar,20),
					new OracleParameter(":SELECTRICALQUANTITY", OracleType.VarChar,20),
					new OracleParameter(":SPROJECTNAME", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_MONTH", OracleType.VarChar,20),
					new OracleParameter(":SWORKUNIT", OracleType.VarChar,20),
					new OracleParameter(":NRECOVERYVALUE", OracleType.VarChar,20),
					new OracleParameter(":SDEPRECIATIONUNIT", OracleType.VarChar,20),
					new OracleParameter(":SSTATUSCODE", OracleType.VarChar,20),
					new OracleParameter(":SMOTORPOWER", OracleType.VarChar,20),
					new OracleParameter(":SFUNDSSOURCE", OracleType.VarChar,20),
					new OracleParameter(":NRESERVEVALUE_TOTAL", OracleType.VarChar,20),
					new OracleParameter(":SREDUCTION", OracleType.VarChar,20),
					new OracleParameter(":SIMPORT", OracleType.VarChar,20),
					new OracleParameter(":SPROJECT", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_TOTAL", OracleType.VarChar,20),
					new OracleParameter(":SENTRYDATE", OracleType.VarChar,20),
					new OracleParameter(":SCANCELLATIONEDITOR", OracleType.VarChar,20),
					new OracleParameter(":SINCREASE", OracleType.VarChar,20),
					new OracleParameter(":SCANCELLATIONCAUSE", OracleType.VarChar,20),
					new OracleParameter(":SEXCHANGERATE", OracleType.VarChar,20),
					new OracleParameter(":SBUYCOMPANY", OracleType.VarChar,20),
					new OracleParameter(":SFACTORYNAME", OracleType.VarChar,50),
					new OracleParameter(":SDEPR_ACCCODE", OracleType.VarChar,20),
					new OracleParameter(":SCANCELLATIONDATE", OracleType.VarChar,20),
					new OracleParameter(":SDEPRECIATIONMETHOD", OracleType.VarChar,20),
					new OracleParameter(":SSTORAGESITES", OracleType.VarChar,20),
					new OracleParameter(":SENTRYEDITOR", OracleType.VarChar,20),
					new OracleParameter(":SDEPARTMENTCODE", OracleType.VarChar,20),
					new OracleParameter(":SUNITNUMBER", OracleType.VarChar,20),
					new OracleParameter(":SSUPPLYUNIT", OracleType.VarChar,50),
					new OracleParameter(":COLUMN_11", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_12", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_13", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_14", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_15", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_16", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_17", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_18", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_19", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_20", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_21", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_22", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_23", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_24", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_25", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_26", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_27", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_28", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_29", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_30", OracleType.VarChar,20),
					new OracleParameter(":TS", OracleType.VarChar,20),
					new OracleParameter(":SLAST_UODATE_BY", OracleType.VarChar,20)};
			parameters[0].Value = model.MD_ID;
			parameters[1].Value = model.SCORPCODE;
			parameters[2].Value = model.SASSETSCODE;
			parameters[3].Value = model.SMASTERCARDCODE;
			parameters[4].Value = model.IDENTIFIERCODE;
			parameters[5].Value = model.SCLASSCODE;
			parameters[6].Value = model.SALTERATIONCODE;
			parameters[7].Value = model.BISNEW;
			parameters[8].Value = model.SCURSTATUS;
			parameters[9].Value = model.SDESCRIPTION;
			parameters[10].Value = model.DIMENSIONALCODE;
			parameters[11].Value = model.ONEDIMENSIONALCODE;
			parameters[12].Value = model.SASSETSNAME;
			parameters[13].Value = model.NINITCURRENCY;
			parameters[14].Value = model.NNETVALUE;
			parameters[15].Value = model.SDEPARTMENTNAME;
			parameters[16].Value = model.SBUSE_DATE;
			parameters[17].Value = model.SSPECIFICATION;
			parameters[18].Value = model.SKEEPER;
			parameters[19].Value = model.SDEVICECLASS_CODE;
			parameters[20].Value = model.SFOREIGN_INITCUR;
			parameters[21].Value = model.SPROJECTCODE;
			parameters[22].Value = model.SWORKLOAD_TOTAL;
			parameters[23].Value = model.NDEPRECIATION_RATE;
			parameters[24].Value = model.NRECOVERYRATE;
			parameters[25].Value = model.NDEPRECIATION_VALUE;
			parameters[26].Value = model.SDEVICECLASS_NAME;
			parameters[27].Value = model.SCURRENCY;
			parameters[28].Value = model.SFACTORYNUMBER;
			parameters[29].Value = model.NREMAINDERMONTH;
			parameters[30].Value = model.NLIFELIMITATION;
			parameters[31].Value = model.NRESERVEVALUE_TOTAL2;
			parameters[32].Value = model.STOTALWORK;
			parameters[33].Value = model.SMONTHWORK;
			parameters[34].Value = model.SCONSTRUCTIONAREA;
			parameters[35].Value = model.SSUPPLIERCOMPANY;
			parameters[36].Value = model.SELECTRICALQUANTITY;
			parameters[37].Value = model.SPROJECTNAME;
			parameters[38].Value = model.NDEPRECIATION_MONTH;
			parameters[39].Value = model.SWORKUNIT;
			parameters[40].Value = model.NRECOVERYVALUE;
			parameters[41].Value = model.SDEPRECIATIONUNIT;
			parameters[42].Value = model.SSTATUSCODE;
			parameters[43].Value = model.SMOTORPOWER;
			parameters[44].Value = model.SFUNDSSOURCE;
			parameters[45].Value = model.NRESERVEVALUE_TOTAL;
			parameters[46].Value = model.SREDUCTION;
			parameters[47].Value = model.SIMPORT;
			parameters[48].Value = model.SPROJECT;
			parameters[49].Value = model.NDEPRECIATION_TOTAL;
			parameters[50].Value = model.SENTRYDATE;
			parameters[51].Value = model.SCANCELLATIONEDITOR;
			parameters[52].Value = model.SINCREASE;
			parameters[53].Value = model.SCANCELLATIONCAUSE;
			parameters[54].Value = model.SEXCHANGERATE;
			parameters[55].Value = model.SBUYCOMPANY;
			parameters[56].Value = model.SFACTORYNAME;
			parameters[57].Value = model.SDEPR_ACCCODE;
			parameters[58].Value = model.SCANCELLATIONDATE;
			parameters[59].Value = model.SDEPRECIATIONMETHOD;
			parameters[60].Value = model.SSTORAGESITES;
			parameters[61].Value = model.SENTRYEDITOR;
			parameters[62].Value = model.SDEPARTMENTCODE;
			parameters[63].Value = model.SUNITNUMBER;
			parameters[64].Value = model.SSUPPLYUNIT;
			parameters[65].Value = model.COLUMN_11;
			parameters[66].Value = model.COLUMN_12;
			parameters[67].Value = model.COLUMN_13;
			parameters[68].Value = model.COLUMN_14;
			parameters[69].Value = model.COLUMN_15;
			parameters[70].Value = model.COLUMN_16;
			parameters[71].Value = model.COLUMN_17;
			parameters[72].Value = model.COLUMN_18;
			parameters[73].Value = model.COLUMN_19;
			parameters[74].Value = model.COLUMN_20;
			parameters[75].Value = model.COLUMN_21;
			parameters[76].Value = model.COLUMN_22;
			parameters[77].Value = model.COLUMN_23;
			parameters[78].Value = model.COLUMN_24;
			parameters[79].Value = model.COLUMN_25;
			parameters[80].Value = model.COLUMN_26;
			parameters[81].Value = model.COLUMN_27;
			parameters[82].Value = model.COLUMN_28;
			parameters[83].Value = model.COLUMN_29;
			parameters[84].Value = model.COLUMN_30;
			parameters[85].Value = model.TS;
			parameters[86].Value = model.SLAST_UODATE_BY;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update(TKFA.Model.FA_MASTERDATA model)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update FA_MASTERDATA set ");
			strSql.Append("SCORPCODE=:SCORPCODE,");
			strSql.Append("SASSETSCODE=:SASSETSCODE,");
			strSql.Append("SMASTERCARDCODE=:SMASTERCARDCODE,");
			strSql.Append("IDENTIFIERCODE=:IDENTIFIERCODE,");
			strSql.Append("SCLASSCODE=:SCLASSCODE,");
			strSql.Append("SALTERATIONCODE=:SALTERATIONCODE,");
			strSql.Append("BISNEW=:BISNEW,");
			strSql.Append("SCURSTATUS=:SCURSTATUS,");
			strSql.Append("SDESCRIPTION=:SDESCRIPTION,");
			strSql.Append("DIMENSIONALCODE=:DIMENSIONALCODE,");
			strSql.Append("ONEDIMENSIONALCODE=:ONEDIMENSIONALCODE,");
			strSql.Append("SASSETSNAME=:SASSETSNAME,");
			strSql.Append("NINITCURRENCY=:NINITCURRENCY,");
			strSql.Append("NNETVALUE=:NNETVALUE,");
			strSql.Append("SDEPARTMENTNAME=:SDEPARTMENTNAME,");
			strSql.Append("SBUSE_DATE=:SBUSE_DATE,");
			strSql.Append("SSPECIFICATION=:SSPECIFICATION,");
			strSql.Append("SKEEPER=:SKEEPER,");
			strSql.Append("SDEVICECLASS_CODE=:SDEVICECLASS_CODE,");
			strSql.Append("SFOREIGN_INITCUR=:SFOREIGN_INITCUR,");
			strSql.Append("SPROJECTCODE=:SPROJECTCODE,");
			strSql.Append("SWORKLOAD_TOTAL=:SWORKLOAD_TOTAL,");
			strSql.Append("NDEPRECIATION_RATE=:NDEPRECIATION_RATE,");
			strSql.Append("NRECOVERYRATE=:NRECOVERYRATE,");
			strSql.Append("NDEPRECIATION_VALUE=:NDEPRECIATION_VALUE,");
			strSql.Append("SDEVICECLASS_NAME=:SDEVICECLASS_NAME,");
			strSql.Append("SCURRENCY=:SCURRENCY,");
			strSql.Append("SFACTORYNUMBER=:SFACTORYNUMBER,");
			strSql.Append("NREMAINDERMONTH=:NREMAINDERMONTH,");
			strSql.Append("NLIFELIMITATION=:NLIFELIMITATION,");
			strSql.Append("NRESERVEVALUE_TOTAL2=:NRESERVEVALUE_TOTAL2,");
			strSql.Append("STOTALWORK=:STOTALWORK,");
			strSql.Append("SMONTHWORK=:SMONTHWORK,");
			strSql.Append("SCONSTRUCTIONAREA=:SCONSTRUCTIONAREA,");
			strSql.Append("SSUPPLIERCOMPANY=:SSUPPLIERCOMPANY,");
			strSql.Append("SELECTRICALQUANTITY=:SELECTRICALQUANTITY,");
			strSql.Append("SPROJECTNAME=:SPROJECTNAME,");
			strSql.Append("NDEPRECIATION_MONTH=:NDEPRECIATION_MONTH,");
			strSql.Append("SWORKUNIT=:SWORKUNIT,");
			strSql.Append("NRECOVERYVALUE=:NRECOVERYVALUE,");
			strSql.Append("SDEPRECIATIONUNIT=:SDEPRECIATIONUNIT,");
			strSql.Append("SSTATUSCODE=:SSTATUSCODE,");
			strSql.Append("SMOTORPOWER=:SMOTORPOWER,");
			strSql.Append("SFUNDSSOURCE=:SFUNDSSOURCE,");
			strSql.Append("NRESERVEVALUE_TOTAL=:NRESERVEVALUE_TOTAL,");
			strSql.Append("SREDUCTION=:SREDUCTION,");
			strSql.Append("SIMPORT=:SIMPORT,");
			strSql.Append("SPROJECT=:SPROJECT,");
			strSql.Append("NDEPRECIATION_TOTAL=:NDEPRECIATION_TOTAL,");
			strSql.Append("SENTRYDATE=:SENTRYDATE,");
			strSql.Append("SCANCELLATIONEDITOR=:SCANCELLATIONEDITOR,");
			strSql.Append("SINCREASE=:SINCREASE,");
			strSql.Append("SCANCELLATIONCAUSE=:SCANCELLATIONCAUSE,");
			strSql.Append("SEXCHANGERATE=:SEXCHANGERATE,");
			strSql.Append("SBUYCOMPANY=:SBUYCOMPANY,");
			strSql.Append("SFACTORYNAME=:SFACTORYNAME,");
			strSql.Append("SDEPR_ACCCODE=:SDEPR_ACCCODE,");
			strSql.Append("SCANCELLATIONDATE=:SCANCELLATIONDATE,");
			strSql.Append("SDEPRECIATIONMETHOD=:SDEPRECIATIONMETHOD,");
			strSql.Append("SSTORAGESITES=:SSTORAGESITES,");
			strSql.Append("SENTRYEDITOR=:SENTRYEDITOR,");
			strSql.Append("SDEPARTMENTCODE=:SDEPARTMENTCODE,");
			strSql.Append("SUNITNUMBER=:SUNITNUMBER,");
			strSql.Append("SSUPPLYUNIT=:SSUPPLYUNIT,");
			strSql.Append("COLUMN_11=:COLUMN_11,");
			strSql.Append("COLUMN_12=:COLUMN_12,");
			strSql.Append("COLUMN_13=:COLUMN_13,");
			strSql.Append("COLUMN_14=:COLUMN_14,");
			strSql.Append("COLUMN_15=:COLUMN_15,");
			strSql.Append("COLUMN_16=:COLUMN_16,");
			strSql.Append("COLUMN_17=:COLUMN_17,");
			strSql.Append("COLUMN_18=:COLUMN_18,");
			strSql.Append("COLUMN_19=:COLUMN_19,");
			strSql.Append("COLUMN_20=:COLUMN_20,");
			strSql.Append("COLUMN_21=:COLUMN_21,");
			strSql.Append("COLUMN_22=:COLUMN_22,");
			strSql.Append("COLUMN_23=:COLUMN_23,");
			strSql.Append("COLUMN_24=:COLUMN_24,");
			strSql.Append("COLUMN_25=:COLUMN_25,");
			strSql.Append("COLUMN_26=:COLUMN_26,");
			strSql.Append("COLUMN_27=:COLUMN_27,");
			strSql.Append("COLUMN_28=:COLUMN_28,");
			strSql.Append("COLUMN_29=:COLUMN_29,");
			strSql.Append("COLUMN_30=:COLUMN_30,");
			strSql.Append("TS=:TS,");
			strSql.Append("SLAST_UODATE_BY=:SLAST_UODATE_BY");
			strSql.Append(" where MD_ID=:MD_ID ");
			OracleParameter[] parameters = {
					new OracleParameter(":SCORPCODE", OracleType.VarChar,20),
					new OracleParameter(":SASSETSCODE", OracleType.VarChar,20),
					new OracleParameter(":SMASTERCARDCODE", OracleType.VarChar,20),
					new OracleParameter(":IDENTIFIERCODE", OracleType.VarChar,20),
					new OracleParameter(":SCLASSCODE", OracleType.VarChar,20),
					new OracleParameter(":SALTERATIONCODE", OracleType.VarChar,20),
					new OracleParameter(":BISNEW", OracleType.Char,1),
					new OracleParameter(":SCURSTATUS", OracleType.VarChar,20),
					new OracleParameter(":SDESCRIPTION", OracleType.VarChar,20),
					new OracleParameter(":DIMENSIONALCODE", OracleType.VarChar,20),
					new OracleParameter(":ONEDIMENSIONALCODE", OracleType.VarChar,20),
					new OracleParameter(":SASSETSNAME", OracleType.VarChar,50),
					new OracleParameter(":NINITCURRENCY", OracleType.VarChar,20),
					new OracleParameter(":NNETVALUE", OracleType.VarChar,20),
					new OracleParameter(":SDEPARTMENTNAME", OracleType.VarChar,20),
					new OracleParameter(":SBUSE_DATE", OracleType.VarChar,20),
					new OracleParameter(":SSPECIFICATION", OracleType.VarChar,80),
					new OracleParameter(":SKEEPER", OracleType.VarChar,20),
					new OracleParameter(":SDEVICECLASS_CODE", OracleType.VarChar,20),
					new OracleParameter(":SFOREIGN_INITCUR", OracleType.VarChar,20),
					new OracleParameter(":SPROJECTCODE", OracleType.VarChar,20),
					new OracleParameter(":SWORKLOAD_TOTAL", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_RATE", OracleType.VarChar,20),
					new OracleParameter(":NRECOVERYRATE", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_VALUE", OracleType.VarChar,20),
					new OracleParameter(":SDEVICECLASS_NAME", OracleType.VarChar,20),
					new OracleParameter(":SCURRENCY", OracleType.VarChar,20),
					new OracleParameter(":SFACTORYNUMBER", OracleType.VarChar,20),
					new OracleParameter(":NREMAINDERMONTH", OracleType.VarChar,20),
					new OracleParameter(":NLIFELIMITATION", OracleType.VarChar,20),
					new OracleParameter(":NRESERVEVALUE_TOTAL2", OracleType.VarChar,20),
					new OracleParameter(":STOTALWORK", OracleType.VarChar,20),
					new OracleParameter(":SMONTHWORK", OracleType.VarChar,20),
					new OracleParameter(":SCONSTRUCTIONAREA", OracleType.VarChar,20),
					new OracleParameter(":SSUPPLIERCOMPANY", OracleType.VarChar,20),
					new OracleParameter(":SELECTRICALQUANTITY", OracleType.VarChar,20),
					new OracleParameter(":SPROJECTNAME", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_MONTH", OracleType.VarChar,20),
					new OracleParameter(":SWORKUNIT", OracleType.VarChar,20),
					new OracleParameter(":NRECOVERYVALUE", OracleType.VarChar,20),
					new OracleParameter(":SDEPRECIATIONUNIT", OracleType.VarChar,20),
					new OracleParameter(":SSTATUSCODE", OracleType.VarChar,20),
					new OracleParameter(":SMOTORPOWER", OracleType.VarChar,20),
					new OracleParameter(":SFUNDSSOURCE", OracleType.VarChar,20),
					new OracleParameter(":NRESERVEVALUE_TOTAL", OracleType.VarChar,20),
					new OracleParameter(":SREDUCTION", OracleType.VarChar,20),
					new OracleParameter(":SIMPORT", OracleType.VarChar,20),
					new OracleParameter(":SPROJECT", OracleType.VarChar,20),
					new OracleParameter(":NDEPRECIATION_TOTAL", OracleType.VarChar,20),
					new OracleParameter(":SENTRYDATE", OracleType.VarChar,20),
					new OracleParameter(":SCANCELLATIONEDITOR", OracleType.VarChar,20),
					new OracleParameter(":SINCREASE", OracleType.VarChar,20),
					new OracleParameter(":SCANCELLATIONCAUSE", OracleType.VarChar,20),
					new OracleParameter(":SEXCHANGERATE", OracleType.VarChar,20),
					new OracleParameter(":SBUYCOMPANY", OracleType.VarChar,20),
					new OracleParameter(":SFACTORYNAME", OracleType.VarChar,50),
					new OracleParameter(":SDEPR_ACCCODE", OracleType.VarChar,20),
					new OracleParameter(":SCANCELLATIONDATE", OracleType.VarChar,20),
					new OracleParameter(":SDEPRECIATIONMETHOD", OracleType.VarChar,20),
					new OracleParameter(":SSTORAGESITES", OracleType.VarChar,20),
					new OracleParameter(":SENTRYEDITOR", OracleType.VarChar,20),
					new OracleParameter(":SDEPARTMENTCODE", OracleType.VarChar,20),
					new OracleParameter(":SUNITNUMBER", OracleType.VarChar,20),
					new OracleParameter(":SSUPPLYUNIT", OracleType.VarChar,50),
					new OracleParameter(":COLUMN_11", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_12", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_13", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_14", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_15", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_16", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_17", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_18", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_19", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_20", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_21", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_22", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_23", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_24", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_25", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_26", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_27", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_28", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_29", OracleType.VarChar,20),
					new OracleParameter(":COLUMN_30", OracleType.VarChar,20),
					new OracleParameter(":TS", OracleType.VarChar,20),
					new OracleParameter(":SLAST_UODATE_BY", OracleType.VarChar,20),
					new OracleParameter(":MD_ID", OracleType.Raw,16)};
			parameters[0].Value = model.SCORPCODE;
			parameters[1].Value = model.SASSETSCODE;
			parameters[2].Value = model.SMASTERCARDCODE;
			parameters[3].Value = model.IDENTIFIERCODE;
			parameters[4].Value = model.SCLASSCODE;
			parameters[5].Value = model.SALTERATIONCODE;
			parameters[6].Value = model.BISNEW;
			parameters[7].Value = model.SCURSTATUS;
			parameters[8].Value = model.SDESCRIPTION;
			parameters[9].Value = model.DIMENSIONALCODE;
			parameters[10].Value = model.ONEDIMENSIONALCODE;
			parameters[11].Value = model.SASSETSNAME;
			parameters[12].Value = model.NINITCURRENCY;
			parameters[13].Value = model.NNETVALUE;
			parameters[14].Value = model.SDEPARTMENTNAME;
			parameters[15].Value = model.SBUSE_DATE;
			parameters[16].Value = model.SSPECIFICATION;
			parameters[17].Value = model.SKEEPER;
			parameters[18].Value = model.SDEVICECLASS_CODE;
			parameters[19].Value = model.SFOREIGN_INITCUR;
			parameters[20].Value = model.SPROJECTCODE;
			parameters[21].Value = model.SWORKLOAD_TOTAL;
			parameters[22].Value = model.NDEPRECIATION_RATE;
			parameters[23].Value = model.NRECOVERYRATE;
			parameters[24].Value = model.NDEPRECIATION_VALUE;
			parameters[25].Value = model.SDEVICECLASS_NAME;
			parameters[26].Value = model.SCURRENCY;
			parameters[27].Value = model.SFACTORYNUMBER;
			parameters[28].Value = model.NREMAINDERMONTH;
			parameters[29].Value = model.NLIFELIMITATION;
			parameters[30].Value = model.NRESERVEVALUE_TOTAL2;
			parameters[31].Value = model.STOTALWORK;
			parameters[32].Value = model.SMONTHWORK;
			parameters[33].Value = model.SCONSTRUCTIONAREA;
			parameters[34].Value = model.SSUPPLIERCOMPANY;
			parameters[35].Value = model.SELECTRICALQUANTITY;
			parameters[36].Value = model.SPROJECTNAME;
			parameters[37].Value = model.NDEPRECIATION_MONTH;
			parameters[38].Value = model.SWORKUNIT;
			parameters[39].Value = model.NRECOVERYVALUE;
			parameters[40].Value = model.SDEPRECIATIONUNIT;
			parameters[41].Value = model.SSTATUSCODE;
			parameters[42].Value = model.SMOTORPOWER;
			parameters[43].Value = model.SFUNDSSOURCE;
			parameters[44].Value = model.NRESERVEVALUE_TOTAL;
			parameters[45].Value = model.SREDUCTION;
			parameters[46].Value = model.SIMPORT;
			parameters[47].Value = model.SPROJECT;
			parameters[48].Value = model.NDEPRECIATION_TOTAL;
			parameters[49].Value = model.SENTRYDATE;
			parameters[50].Value = model.SCANCELLATIONEDITOR;
			parameters[51].Value = model.SINCREASE;
			parameters[52].Value = model.SCANCELLATIONCAUSE;
			parameters[53].Value = model.SEXCHANGERATE;
			parameters[54].Value = model.SBUYCOMPANY;
			parameters[55].Value = model.SFACTORYNAME;
			parameters[56].Value = model.SDEPR_ACCCODE;
			parameters[57].Value = model.SCANCELLATIONDATE;
			parameters[58].Value = model.SDEPRECIATIONMETHOD;
			parameters[59].Value = model.SSTORAGESITES;
			parameters[60].Value = model.SENTRYEDITOR;
			parameters[61].Value = model.SDEPARTMENTCODE;
			parameters[62].Value = model.SUNITNUMBER;
			parameters[63].Value = model.SSUPPLYUNIT;
			parameters[64].Value = model.COLUMN_11;
			parameters[65].Value = model.COLUMN_12;
			parameters[66].Value = model.COLUMN_13;
			parameters[67].Value = model.COLUMN_14;
			parameters[68].Value = model.COLUMN_15;
			parameters[69].Value = model.COLUMN_16;
			parameters[70].Value = model.COLUMN_17;
			parameters[71].Value = model.COLUMN_18;
			parameters[72].Value = model.COLUMN_19;
			parameters[73].Value = model.COLUMN_20;
			parameters[74].Value = model.COLUMN_21;
			parameters[75].Value = model.COLUMN_22;
			parameters[76].Value = model.COLUMN_23;
			parameters[77].Value = model.COLUMN_24;
			parameters[78].Value = model.COLUMN_25;
			parameters[79].Value = model.COLUMN_26;
			parameters[80].Value = model.COLUMN_27;
			parameters[81].Value = model.COLUMN_28;
			parameters[82].Value = model.COLUMN_29;
			parameters[83].Value = model.COLUMN_30;
			parameters[84].Value = model.TS;
			parameters[85].Value = model.SLAST_UODATE_BY;
			parameters[86].Value = model.MD_ID;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete(byte[] MD_ID)
		{
			
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from FA_MASTERDATA ");
			strSql.Append(" where MD_ID=:MD_ID ");
			OracleParameter[] parameters = {
					new OracleParameter(":MD_ID", OracleType.Raw,16)			};
			parameters[0].Value = MD_ID;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		/// <summary>
		/// 批量删除数据
		/// </summary>
		public bool DeleteList(string MD_IDlist )
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from FA_MASTERDATA ");
			strSql.Append(" where MD_ID in ("+MD_IDlist + ")  ");
			int rows=DbHelperOra.ExecuteSql(strSql.ToString());
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public TKFA.Model.FA_MASTERDATA GetModel(byte[] MD_ID)
		{
			
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select MD_ID,SCORPCODE,SASSETSCODE,SMASTERCARDCODE,IDENTIFIERCODE,SCLASSCODE,SALTERATIONCODE,BISNEW,SCURSTATUS,SDESCRIPTION,DIMENSIONALCODE,ONEDIMENSIONALCODE,SASSETSNAME,NINITCURRENCY,NNETVALUE,SDEPARTMENTNAME,SBUSE_DATE,SSPECIFICATION,SKEEPER,SDEVICECLASS_CODE,SFOREIGN_INITCUR,SPROJECTCODE,SWORKLOAD_TOTAL,NDEPRECIATION_RATE,NRECOVERYRATE,NDEPRECIATION_VALUE,SDEVICECLASS_NAME,SCURRENCY,SFACTORYNUMBER,NREMAINDERMONTH,NLIFELIMITATION,NRESERVEVALUE_TOTAL2,STOTALWORK,SMONTHWORK,SCONSTRUCTIONAREA,SSUPPLIERCOMPANY,SELECTRICALQUANTITY,SPROJECTNAME,NDEPRECIATION_MONTH,SWORKUNIT,NRECOVERYVALUE,SDEPRECIATIONUNIT,SSTATUSCODE,SMOTORPOWER,SFUNDSSOURCE,NRESERVEVALUE_TOTAL,SREDUCTION,SIMPORT,SPROJECT,NDEPRECIATION_TOTAL,SENTRYDATE,SCANCELLATIONEDITOR,SINCREASE,SCANCELLATIONCAUSE,SEXCHANGERATE,SBUYCOMPANY,SFACTORYNAME,SDEPR_ACCCODE,SCANCELLATIONDATE,SDEPRECIATIONMETHOD,SSTORAGESITES,SENTRYEDITOR,SDEPARTMENTCODE,SUNITNUMBER,SSUPPLYUNIT,COLUMN_11,COLUMN_12,COLUMN_13,COLUMN_14,COLUMN_15,COLUMN_16,COLUMN_17,COLUMN_18,COLUMN_19,COLUMN_20,COLUMN_21,COLUMN_22,COLUMN_23,COLUMN_24,COLUMN_25,COLUMN_26,COLUMN_27,COLUMN_28,COLUMN_29,COLUMN_30,TS,SLAST_UODATE_BY from FA_MASTERDATA ");
			strSql.Append(" where MD_ID=:MD_ID ");
			OracleParameter[] parameters = {
					new OracleParameter(":MD_ID", OracleType.Raw,16)			};
			parameters[0].Value = MD_ID;

			TKFA.Model.FA_MASTERDATA model=new TKFA.Model.FA_MASTERDATA();
			DataSet ds=DbHelperOra.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				return DataRowToModel(ds.Tables[0].Rows[0]);
			}
			else
			{
				return null;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public TKFA.Model.FA_MASTERDATA DataRowToModel(DataRow row)
		{
			TKFA.Model.FA_MASTERDATA model=new TKFA.Model.FA_MASTERDATA();
			if (row != null)
			{
				if(row["MD_ID"]!=null && row["MD_ID"].ToString()!="")
				{
					model.MD_ID=(byte[])row["MD_ID"];
				}
				if(row["SCORPCODE"]!=null)
				{
					model.SCORPCODE=row["SCORPCODE"].ToString();
				}
				if(row["SASSETSCODE"]!=null)
				{
					model.SASSETSCODE=row["SASSETSCODE"].ToString();
				}
				if(row["SMASTERCARDCODE"]!=null)
				{
					model.SMASTERCARDCODE=row["SMASTERCARDCODE"].ToString();
				}
				if(row["IDENTIFIERCODE"]!=null)
				{
					model.IDENTIFIERCODE=row["IDENTIFIERCODE"].ToString();
				}
				if(row["SCLASSCODE"]!=null)
				{
					model.SCLASSCODE=row["SCLASSCODE"].ToString();
				}
				if(row["SALTERATIONCODE"]!=null)
				{
					model.SALTERATIONCODE=row["SALTERATIONCODE"].ToString();
				}
				if(row["BISNEW"]!=null)
				{
					model.BISNEW=row["BISNEW"].ToString();
				}
				if(row["SCURSTATUS"]!=null)
				{
					model.SCURSTATUS=row["SCURSTATUS"].ToString();
				}
				if(row["SDESCRIPTION"]!=null)
				{
					model.SDESCRIPTION=row["SDESCRIPTION"].ToString();
				}
				if(row["DIMENSIONALCODE"]!=null)
				{
					model.DIMENSIONALCODE=row["DIMENSIONALCODE"].ToString();
				}
				if(row["ONEDIMENSIONALCODE"]!=null)
				{
					model.ONEDIMENSIONALCODE=row["ONEDIMENSIONALCODE"].ToString();
				}
				if(row["SASSETSNAME"]!=null)
				{
					model.SASSETSNAME=row["SASSETSNAME"].ToString();
				}
				if(row["NINITCURRENCY"]!=null)
				{
					model.NINITCURRENCY=row["NINITCURRENCY"].ToString();
				}
				if(row["NNETVALUE"]!=null)
				{
					model.NNETVALUE=row["NNETVALUE"].ToString();
				}
				if(row["SDEPARTMENTNAME"]!=null)
				{
					model.SDEPARTMENTNAME=row["SDEPARTMENTNAME"].ToString();
				}
				if(row["SBUSE_DATE"]!=null)
				{
					model.SBUSE_DATE=row["SBUSE_DATE"].ToString();
				}
				if(row["SSPECIFICATION"]!=null)
				{
					model.SSPECIFICATION=row["SSPECIFICATION"].ToString();
				}
				if(row["SKEEPER"]!=null)
				{
					model.SKEEPER=row["SKEEPER"].ToString();
				}
				if(row["SDEVICECLASS_CODE"]!=null)
				{
					model.SDEVICECLASS_CODE=row["SDEVICECLASS_CODE"].ToString();
				}
				if(row["SFOREIGN_INITCUR"]!=null)
				{
					model.SFOREIGN_INITCUR=row["SFOREIGN_INITCUR"].ToString();
				}
				if(row["SPROJECTCODE"]!=null)
				{
					model.SPROJECTCODE=row["SPROJECTCODE"].ToString();
				}
				if(row["SWORKLOAD_TOTAL"]!=null)
				{
					model.SWORKLOAD_TOTAL=row["SWORKLOAD_TOTAL"].ToString();
				}
				if(row["NDEPRECIATION_RATE"]!=null)
				{
					model.NDEPRECIATION_RATE=row["NDEPRECIATION_RATE"].ToString();
				}
				if(row["NRECOVERYRATE"]!=null)
				{
					model.NRECOVERYRATE=row["NRECOVERYRATE"].ToString();
				}
				if(row["NDEPRECIATION_VALUE"]!=null)
				{
					model.NDEPRECIATION_VALUE=row["NDEPRECIATION_VALUE"].ToString();
				}
				if(row["SDEVICECLASS_NAME"]!=null)
				{
					model.SDEVICECLASS_NAME=row["SDEVICECLASS_NAME"].ToString();
				}
				if(row["SCURRENCY"]!=null)
				{
					model.SCURRENCY=row["SCURRENCY"].ToString();
				}
				if(row["SFACTORYNUMBER"]!=null)
				{
					model.SFACTORYNUMBER=row["SFACTORYNUMBER"].ToString();
				}
				if(row["NREMAINDERMONTH"]!=null)
				{
					model.NREMAINDERMONTH=row["NREMAINDERMONTH"].ToString();
				}
				if(row["NLIFELIMITATION"]!=null)
				{
					model.NLIFELIMITATION=row["NLIFELIMITATION"].ToString();
				}
				if(row["NRESERVEVALUE_TOTAL2"]!=null)
				{
					model.NRESERVEVALUE_TOTAL2=row["NRESERVEVALUE_TOTAL2"].ToString();
				}
				if(row["STOTALWORK"]!=null)
				{
					model.STOTALWORK=row["STOTALWORK"].ToString();
				}
				if(row["SMONTHWORK"]!=null)
				{
					model.SMONTHWORK=row["SMONTHWORK"].ToString();
				}
				if(row["SCONSTRUCTIONAREA"]!=null)
				{
					model.SCONSTRUCTIONAREA=row["SCONSTRUCTIONAREA"].ToString();
				}
				if(row["SSUPPLIERCOMPANY"]!=null)
				{
					model.SSUPPLIERCOMPANY=row["SSUPPLIERCOMPANY"].ToString();
				}
				if(row["SELECTRICALQUANTITY"]!=null)
				{
					model.SELECTRICALQUANTITY=row["SELECTRICALQUANTITY"].ToString();
				}
				if(row["SPROJECTNAME"]!=null)
				{
					model.SPROJECTNAME=row["SPROJECTNAME"].ToString();
				}
				if(row["NDEPRECIATION_MONTH"]!=null)
				{
					model.NDEPRECIATION_MONTH=row["NDEPRECIATION_MONTH"].ToString();
				}
				if(row["SWORKUNIT"]!=null)
				{
					model.SWORKUNIT=row["SWORKUNIT"].ToString();
				}
				if(row["NRECOVERYVALUE"]!=null)
				{
					model.NRECOVERYVALUE=row["NRECOVERYVALUE"].ToString();
				}
				if(row["SDEPRECIATIONUNIT"]!=null)
				{
					model.SDEPRECIATIONUNIT=row["SDEPRECIATIONUNIT"].ToString();
				}
				if(row["SSTATUSCODE"]!=null)
				{
					model.SSTATUSCODE=row["SSTATUSCODE"].ToString();
				}
				if(row["SMOTORPOWER"]!=null)
				{
					model.SMOTORPOWER=row["SMOTORPOWER"].ToString();
				}
				if(row["SFUNDSSOURCE"]!=null)
				{
					model.SFUNDSSOURCE=row["SFUNDSSOURCE"].ToString();
				}
				if(row["NRESERVEVALUE_TOTAL"]!=null)
				{
					model.NRESERVEVALUE_TOTAL=row["NRESERVEVALUE_TOTAL"].ToString();
				}
				if(row["SREDUCTION"]!=null)
				{
					model.SREDUCTION=row["SREDUCTION"].ToString();
				}
				if(row["SIMPORT"]!=null)
				{
					model.SIMPORT=row["SIMPORT"].ToString();
				}
				if(row["SPROJECT"]!=null)
				{
					model.SPROJECT=row["SPROJECT"].ToString();
				}
				if(row["NDEPRECIATION_TOTAL"]!=null)
				{
					model.NDEPRECIATION_TOTAL=row["NDEPRECIATION_TOTAL"].ToString();
				}
				if(row["SENTRYDATE"]!=null)
				{
					model.SENTRYDATE=row["SENTRYDATE"].ToString();
				}
				if(row["SCANCELLATIONEDITOR"]!=null)
				{
					model.SCANCELLATIONEDITOR=row["SCANCELLATIONEDITOR"].ToString();
				}
				if(row["SINCREASE"]!=null)
				{
					model.SINCREASE=row["SINCREASE"].ToString();
				}
				if(row["SCANCELLATIONCAUSE"]!=null)
				{
					model.SCANCELLATIONCAUSE=row["SCANCELLATIONCAUSE"].ToString();
				}
				if(row["SEXCHANGERATE"]!=null)
				{
					model.SEXCHANGERATE=row["SEXCHANGERATE"].ToString();
				}
				if(row["SBUYCOMPANY"]!=null)
				{
					model.SBUYCOMPANY=row["SBUYCOMPANY"].ToString();
				}
				if(row["SFACTORYNAME"]!=null)
				{
					model.SFACTORYNAME=row["SFACTORYNAME"].ToString();
				}
				if(row["SDEPR_ACCCODE"]!=null)
				{
					model.SDEPR_ACCCODE=row["SDEPR_ACCCODE"].ToString();
				}
				if(row["SCANCELLATIONDATE"]!=null)
				{
					model.SCANCELLATIONDATE=row["SCANCELLATIONDATE"].ToString();
				}
				if(row["SDEPRECIATIONMETHOD"]!=null)
				{
					model.SDEPRECIATIONMETHOD=row["SDEPRECIATIONMETHOD"].ToString();
				}
				if(row["SSTORAGESITES"]!=null)
				{
					model.SSTORAGESITES=row["SSTORAGESITES"].ToString();
				}
				if(row["SENTRYEDITOR"]!=null)
				{
					model.SENTRYEDITOR=row["SENTRYEDITOR"].ToString();
				}
				if(row["SDEPARTMENTCODE"]!=null)
				{
					model.SDEPARTMENTCODE=row["SDEPARTMENTCODE"].ToString();
				}
				if(row["SUNITNUMBER"]!=null)
				{
					model.SUNITNUMBER=row["SUNITNUMBER"].ToString();
				}
				if(row["SSUPPLYUNIT"]!=null)
				{
					model.SSUPPLYUNIT=row["SSUPPLYUNIT"].ToString();
				}
				if(row["COLUMN_11"]!=null)
				{
					model.COLUMN_11=row["COLUMN_11"].ToString();
				}
				if(row["COLUMN_12"]!=null)
				{
					model.COLUMN_12=row["COLUMN_12"].ToString();
				}
				if(row["COLUMN_13"]!=null)
				{
					model.COLUMN_13=row["COLUMN_13"].ToString();
				}
				if(row["COLUMN_14"]!=null)
				{
					model.COLUMN_14=row["COLUMN_14"].ToString();
				}
				if(row["COLUMN_15"]!=null)
				{
					model.COLUMN_15=row["COLUMN_15"].ToString();
				}
				if(row["COLUMN_16"]!=null)
				{
					model.COLUMN_16=row["COLUMN_16"].ToString();
				}
				if(row["COLUMN_17"]!=null)
				{
					model.COLUMN_17=row["COLUMN_17"].ToString();
				}
				if(row["COLUMN_18"]!=null)
				{
					model.COLUMN_18=row["COLUMN_18"].ToString();
				}
				if(row["COLUMN_19"]!=null)
				{
					model.COLUMN_19=row["COLUMN_19"].ToString();
				}
				if(row["COLUMN_20"]!=null)
				{
					model.COLUMN_20=row["COLUMN_20"].ToString();
				}
				if(row["COLUMN_21"]!=null)
				{
					model.COLUMN_21=row["COLUMN_21"].ToString();
				}
				if(row["COLUMN_22"]!=null)
				{
					model.COLUMN_22=row["COLUMN_22"].ToString();
				}
				if(row["COLUMN_23"]!=null)
				{
					model.COLUMN_23=row["COLUMN_23"].ToString();
				}
				if(row["COLUMN_24"]!=null)
				{
					model.COLUMN_24=row["COLUMN_24"].ToString();
				}
				if(row["COLUMN_25"]!=null)
				{
					model.COLUMN_25=row["COLUMN_25"].ToString();
				}
				if(row["COLUMN_26"]!=null)
				{
					model.COLUMN_26=row["COLUMN_26"].ToString();
				}
				if(row["COLUMN_27"]!=null)
				{
					model.COLUMN_27=row["COLUMN_27"].ToString();
				}
				if(row["COLUMN_28"]!=null)
				{
					model.COLUMN_28=row["COLUMN_28"].ToString();
				}
				if(row["COLUMN_29"]!=null)
				{
					model.COLUMN_29=row["COLUMN_29"].ToString();
				}
				if(row["COLUMN_30"]!=null)
				{
					model.COLUMN_30=row["COLUMN_30"].ToString();
				}
				if(row["TS"]!=null)
				{
					model.TS=row["TS"].ToString();
				}
				if(row["SLAST_UODATE_BY"]!=null)
				{
					model.SLAST_UODATE_BY=row["SLAST_UODATE_BY"].ToString();
				}
			}
			return model;
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
            strSql.Append("select MD_ID,d.SCORPCODE,c.SCORPNAME,SASSETSCODE,SMASTERCARDCODE,SASSETSNAME,NINITCURRENCY,NNETVALUE,SDEPARTMENTNAME,SBUSE_DATE,SSPECIFICATION,SKEEPER,SDEVICECLASS_CODE,SFOREIGN_INITCUR,SPROJECTCODE,SWORKLOAD_TOTAL,NDEPRECIATION_RATE,NRECOVERYRATE,NDEPRECIATION_VALUE,SDEVICECLASS_NAME,SCURRENCY,SFACTORYNUMBER,NREMAINDERMONTH,NLIFELIMITATION,NRESERVEVALUE_TOTAL2,STOTALWORK,SMONTHWORK,SCONSTRUCTIONAREA,SSUPPLIERCOMPANY,SELECTRICALQUANTITY,SPROJECTNAME,NDEPRECIATION_MONTH,SWORKUNIT,NRECOVERYVALUE,SDEPRECIATIONUNIT,SSTATUSCODE,SMOTORPOWER,SFUNDSSOURCE,NRESERVEVALUE_TOTAL,SREDUCTION,SIMPORT,SPROJECT,NDEPRECIATION_TOTAL,SENTRYDATE,SCANCELLATIONEDITOR,SINCREASE,SCANCELLATIONCAUSE,SEXCHANGERATE,SBUYCOMPANY,SFACTORYNAME,SDEPR_ACCCODE,SCANCELLATIONDATE,SDEPRECIATIONMETHOD,SSTORAGESITES,SENTRYEDITOR,SDEPARTMENTCODE,SUNITNUMBER,SSUPPLYUNIT ");
            strSql.Append(" FROM  FA_MASTERDATA d,FA_CORP c where d.SCORPCODE=c.SCORPCODE ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" and "+strWhere);
			}
			return DbHelperOra.Query(strSql.ToString());
		}

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select MD_ID,d.SCORPCODE,c.SCORPNAME,SASSETSCODE,SMASTERCARDCODE,IDENTIFIERCODE,SCLASSCODE,SALTERATIONCODE,BISNEW,SCURSTATUS,SDESCRIPTION,DIMENSIONALCODE,ONEDIMENSIONALCODE,SASSETSNAME,NINITCURRENCY,NNETVALUE,SDEPARTMENTNAME,SBUSE_DATE,SSPECIFICATION,SKEEPER,SDEVICECLASS_CODE,SFOREIGN_INITCUR,SPROJECTCODE,SWORKLOAD_TOTAL,NDEPRECIATION_RATE,NRECOVERYRATE,NDEPRECIATION_VALUE,SDEVICECLASS_NAME,SCURRENCY,SFACTORYNUMBER,NREMAINDERMONTH,NLIFELIMITATION,NRESERVEVALUE_TOTAL2,STOTALWORK,SMONTHWORK,SCONSTRUCTIONAREA,SSUPPLIERCOMPANY,SELECTRICALQUANTITY,SPROJECTNAME,NDEPRECIATION_MONTH,SWORKUNIT,NRECOVERYVALUE,SDEPRECIATIONUNIT,SSTATUSCODE,SMOTORPOWER,SFUNDSSOURCE,NRESERVEVALUE_TOTAL,SREDUCTION,SIMPORT,SPROJECT,NDEPRECIATION_TOTAL,SENTRYDATE,SCANCELLATIONEDITOR,SINCREASE,SCANCELLATIONCAUSE,SEXCHANGERATE,SBUYCOMPANY,SFACTORYNAME,SDEPR_ACCCODE,SCANCELLATIONDATE,SDEPRECIATIONMETHOD,SSTORAGESITES,SENTRYEDITOR,SDEPARTMENTCODE,SUNITNUMBER,SSUPPLYUNIT ");
            strSql.Append(" FROM FA_MASTERDATA d,FA_CORP c where d.SCORPCODE=c.SCORPCODE ");
            
            return DbHelperOra.Query(strSql.ToString());
        }

		/// <summary>
		/// 获取记录总数
		/// </summary>
		public int GetRecordCount(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) FROM FA_MASTERDATA ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			object obj = DbHelperSQL.GetSingle(strSql.ToString());
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToInt32(obj);
			}
		}
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("SELECT * FROM ( ");
			strSql.Append(" SELECT ROW_NUMBER() OVER (");
			if (!string.IsNullOrEmpty(orderby.Trim()))
			{
				strSql.Append("order by T." + orderby );
			}
			else
			{
				strSql.Append("order by T.MD_ID desc");
			}
			strSql.Append(")AS Row, T.*  from FA_MASTERDATA T ");
			if (!string.IsNullOrEmpty(strWhere.Trim()))
			{
				strSql.Append(" WHERE " + strWhere);
			}
			strSql.Append(" ) TT");
			strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
			return DbHelperOra.Query(strSql.ToString());
		}

		/*
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
		{
			OracleParameter[] parameters = {
					new OracleParameter(":tblName", OracleType.VarChar, 255),
					new OracleParameter(":fldName", OracleType.VarChar, 255),
					new OracleParameter(":PageSize", OracleType.Number),
					new OracleParameter(":PageIndex", OracleType.Number),
					new OracleParameter(":IsReCount", OracleType.Clob),
					new OracleParameter(":OrderType", OracleType.Clob),
					new OracleParameter(":strWhere", OracleType.VarChar,1000),
					};
			parameters[0].Value = "FA_MASTERDATA";
			parameters[1].Value = "MD_ID";
			parameters[2].Value = PageSize;
			parameters[3].Value = PageIndex;
			parameters[4].Value = 0;
			parameters[5].Value = 0;
			parameters[6].Value = strWhere;	
			return DbHelperOra.RunProcedure("UP_GetRecordByPage",parameters,"ds");
		}*/

		#endregion  BasicMethod
		#region  ExtensionMethod

		#endregion  ExtensionMethod
	}
}

